<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>缩写</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">

    <!-- 完整语法 -->
    <a v-bind:href="url">1</a>
    <!-- 缩写 -->
    <a :href="url">2</a>

    <!-- 完整语法 -->
    <a v-on:click="doSomething">3</a>
    <!-- 缩写 -->
    <a @click="doSomething">4</a>

</div>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            url: 'http://www.badiu.com',
            doSomething: function () {
                alert('doSomething');
            }
        }
    })
</script>
</body>
</html>